{extend name="public/layer_base" /}
{block name='content'}

<div class="layui-fluid x-admin-sm">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <form class="layui-form layui-col-space5" action="{:url('index')}" method="GET">
                        <div class="layui-inline layui-show-xs-block">
                            <input value="{$_keywords ? $_keywords : '' ;}" name="_keywords" id="_keywords"
                                class="layui-input" placeholder="名称/描述/代码">
                        </div>
                      
                        <div class="layui-inline layui-show-xs-block">
                            <button class="layui-btn" type="submit"><i class="layui-icon">&#xe615;</i> 查询</button>
                            <button class="layui-btn  layui-btn-primary" onclick="clearSearchForm()" type="reset"><i class="layui-icon layui-icon-delete"></i>清空查询</button>
                        </div>
                    </form>
                </div>
              
                <div class="layui-card-body ">
                    <table class="layui-table layui-form">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <th>名称</th>
                                <th>描述</th>
                                <th>作用模块</th>
                                <th>代码</th>
                                <th>排序</th>
                                <th>创建时间</th>
                                <th>更新时间</th>
                                <th>操作</th>
                        </thead>
                        <tbody>
                            {foreach name="data" id="item"}
                            <tr>
                                <td>{$item.id}</td>
                                <td>{$item.name}</td>
                                <td>{$item.description}</td>
                                <td>{$item.module}</td>
                                <td>{$item.code}</td>
                                <td>{$item.sort_number}</td>
                                <td>{$item.create_time}</td>
                                <td>{$item.update_time}</td>
                                <td class="td-do">
                                    <button  onclick="xadmin.open('修改','{:url('edit',['id'=>$item.id])}')" href="{:url('edit',['id'=>$item.id])}" class="layui-btn  layui-bg-blue layui-btn-xs" title="修改"  >
                                        <i class="layui-icon layui-icon-edit"></i> 修改
                                    </button>
                                </td>
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>

                </div>
                <div class="layui-card-body ">
                    <div id="laypage">
                            共{$total}条
                            <div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-1">
                            <span class="layui-laypage-limits">
                                <select lay-ignore=""  onchange="changePerPage(this)">
                                    <option value="10" selected="">10 条/页</option>
                                    <option value="20">20 条/页</option>
                                    <option value="30">30 条/页</option>
                                    <option value="40">40 条/页</option>
                                    <option value="50">50 条/页</option>
                                </select>
                            </span>
                            {$page|raw}
                        </div>


                    </div>
                </div>
            </div>
        </div>
    </div>
    {/block}